package com.mydemo.executorService;

import java.util.concurrent.CompletableFuture;

/**
 * @author liming1
 */
public class MyExecutorDemo {
    public static void main(String[] args) {
        final CompletableFuture<Void> voidCompletableFuture = CompletableFuture.runAsync(() -> {
            System.out.println("测试voidCompletableFuture");
        });
        final CompletableFuture<String> uCompletableFuture = CompletableFuture.supplyAsync(() -> {
            System.out.println("测试uCompletableFuture");
            return "happy";
        });
    }
}
